<html lang = "zh">
<head>
<title>Contact us</title>
<style type = "text/css">

.fieldWrappererrors ul.errorlist{
    background-color: #ccc;
    margin:0;
    padding:0;
}

.errorlist li{
    /*background-color: red; */
    color: red;
    display: block; 
    font-size: 11px; 
    margin: 0 0 3px; 
    padding: 4px 5px;
}

</style>

</head>

<body>
<h1>Contact us</h1>
<form action = "." method = "POST">
<div class = "fieldWrapper">
{{form.topic.errors}}
<label for = "id_topic">Kind of feedback:</label>
<span>{{form.topic}}</span>
</div>
<div class = "fieldWrapper">
{{from.message.errors}}
<label for = "id_message">Your message:</label>
<p>{{form.message}}</p>
</div>
<div class = "fieldWrapper">
<p>{{from.sender.errors}}</p>
<label for = "id_sender">Your email:</label>
<span>{{form.sender}}</span>
</div>
<p><input type = "submit" value = "submit"></p>
</form>
<div class="fieldWrapper{% if form.message.errors %}errors{% endif %}"> 
    {% if form.message.errors %} 
        <ul class = "errorlist"> 
        {% for error in form.message.errors %} 
            <li><strong>{{ error|escape }}</strong></li> 
        {% endfor %} 
        </ul> 
    {% endif %} 
</div>
</body>
</html>
